<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/6/8
  Time: 19:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title></title>

</head>
<body>
   <script>
     document.cookie
     console.log(document.cookie);
     function getcookie(objname){//获取指定名称的cookie的值
         var arrstr = document.cookie.split("; ");
         for(var i = 0;i < arrstr.length;i ++){
             var temp = arrstr[i].split("=");
             if(temp[0] == objname&&temp[1]=="yes"){
                 location.href="/resources/forum.html";
             }else if(temp[0] == objname&&temp[1]!="yes"){
                 location.href="http://www.baidu.com";
             }
         }
     }
     getcookie("islogin");

   </script>
</body>
islogin?:${cookie.islogin[islogin]}
${document.cookie}
</html>
